FROM debian:13.1-slim
LABEL author=xiaoyilin
LABEL email=406735078@qq.com
ENV TZ=Asia/Shanghai
ADD rust-1.91.0-x86_64-unknown-linux-gnu.tar.xz config.toml /usr/local/rust
RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list.d/debian.sources && \
apt-get -y update && apt-get -y upgrade && apt-get -y install build-essential ca-certificates && \
/usr/local/rust/rust-1.91.0-x86_64-unknown-linux-gnu/install.sh && \
mkdir -p  ~/.cargo && mv /usr/local/rust/config.toml /root/.cargo/config.toml && \
rm -rf /usr/local/rust && rm -rf /var/lib/apt/lists/*
CMD ["rustc","--version"]
# docker build -t registry.cn-hangzhou.aliyuncs.com/xiaoyilin/rust:1.91.0 .
# docker push registry.cn-hangzhou.aliyuncs.com/xiaoyilin/rust:1.91.0
# docker run --rm registry.cn-hangzhou.aliyuncs.com/xiaoyilin/rust:1.91.0
# docker run --rm -it registry.cn-hangzhou.aliyuncs.com/xiaoyilin/rust:1.91.0 bash
# 字节跳动rsproxy官方网站https://rsproxy.cn/

# 验证配置
# 创建一个新的Rust项目来测试配置是否生效
# cargo new hello_rsproxy
# cd hello_rsproxy
# cargo add rand
# cargo add sqlx
# cargo add influxdb
# cargo add rumqttc
# cargo add rumqttd
# cargo build
# https://crates.io/
# https://www-staging.rust-lang.org/zh-CN/learn